package com.yunmai.bookstore.config;



import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringDocConfig {
    @Bean
    public OpenAPI api() {
        return new OpenAPI()
               .info(new Info().title("Bookstore API")
                       .description("This is a sample Spring Boot RESTful API for a bookstore")
                       .version("1.0.0"))
               .externalDocs(new ExternalDocumentation()
                       .description("Spring Boot RESTful API")
                       .url("https://spring.io/projects/spring-boot"));
    }
}
